package com.mallcloud.mall.mall.api.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Optional;

@ApiModel(value="ProXglQRCodePaymentAccumulatePoints",description="累计积分过程对象")
@Data
@ToString
public class ProXglQRCodePaymentAccumulatePoints {

	@ApiModelProperty("门店号")
	private String storeNo;
	@ApiModelProperty("传002")
	private String field1;
	@ApiModelProperty("销售序号")
	private String billNo;

	@ApiModelProperty("执行状态")
	private Integer messageId;
	@ApiModelProperty("执行提示信息")
	private String message;
	@ApiModelProperty("本次计分")
	private String thisPoints;
	@ApiModelProperty("累计积分")
	private String accumulatePoints;
	@ApiModelProperty("备注")
	private String memo;
	@ApiModelProperty("其他累计积分")
	private String otherAccumulatePoints;

	public boolean isSuccess() {
		return Optional.ofNullable(this.messageId).map(x -> x.equals(0)).orElse(false);
	}
}
